import request from 'utils/request'

/**
 * 登录请求
 * @param {*} data {mobile, code}
 * @returns Promise
 */
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/authorizations',
    data,
  })
}

/**
 * 获取用户信息
 * @returns Promise
 */
export const getUserInfo = () => {
  return request({
    url: '/user/profile',
    method: 'get',
  })
}
